Skip to content

fix: adding axon SQL to sdk#767

Merged
dines-rl merged 6 commits intomainfrom
dines/axon-sql
Mar 25, 2026
Merged

fix: adding axon SQL to sdk#767
dines-rl merged 6 commits intomainfrom
dines/axon-sql

Conversation

@dines-rl
Copy link
Copy Markdown
Contributor

No description provided.

@dines-rl dines-rl changed the title fix: Axon SQL fix: adding axon SQL to sdk Mar 25, 2026
Copy link
Copy Markdown
Contributor

@sid-rl sid-rl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments, looks good otherwise

@dines-rl dines-rl merged commit d683fd1 into main Mar 25, 2026
7 checks passed
@dines-rl dines-rl deleted the dines/axon-sql branch March 25, 2026 03:35
@stainless-app stainless-app bot mentioned this pull request Mar 25, 2026
tode-rl added a commit that referenced this pull request Apr 2, 2026
Port verification and testing from TypeScript PR #767 which fixed slow list
endpoints that were auto-paginating through all pages.

## Analysis Results

The Python SDK does NOT suffer from the bug that affected TypeScript because:
- Python implementation uses direct property access (`page.items`)
- TypeScript was using async iteration (`for await`) which auto-paginated
- Our existing unit tests already used correct mocking patterns

## What Was Added

New smoke tests in `tests/smoketests/sdk/test_list_pagination.py`:
- 28 comprehensive tests (15 async, 13 sync)
- Tests all 13 resource types (agents, devboxes, blueprints, etc.)
- Verifies `list(limit=N)` returns at most N items
- Ensures no auto-pagination occurs
- Includes data creation test to verify with actual API calls

## Verification

All SDK list methods verified correct:
✅ AsyncDevboxOps.list() - accesses page.devboxes
✅ AsyncSnapshotOps.list() - accesses page.snapshots
✅ AsyncBlueprintOps.list() - accesses page.blueprints
✅ AsyncStorageObjectOps.list() - accesses page.objects
✅ AsyncAxonOps.list() - accesses result.axons
✅ AsyncScorerOps.list() - accesses page.scorers
✅ AsyncAgentOps.list() - accesses page.agents
✅ AsyncScenarioOps.list() - accesses page.scenarios
✅ AsyncBenchmarkOps.list() - accesses page.benchmarks
✅ AsyncNetworkPolicyOps.list() - accesses page.network_policies
✅ AsyncGatewayConfigOps.list() - accesses page.gateway_configs
✅ AsyncMcpConfigOps.list() - accesses page.mcp_configs
✅ AsyncSecretOps.list() - accesses result.secrets
(+ all sync equivalents)

## Benefits

✅ Faster list results - only fetches requested page
✅ Fewer API requests - no unnecessary pagination
✅ Better resource usage - respects limit parameter
✅ Documented behavior - tests serve as specification
✅ Regression prevention - ensures future changes maintain correctness

## Related

- TypeScript PR: runloopai/api-client-ts#767
- Detailed analysis: PR_767_PORT_SUMMARY.md
- Code comparison: IMPLEMENTATION_COMPARISON.md
- Quick reference: PR_767_PORT.md

## Testing

Run the new tests:
```bash
uv run pytest tests/smoketests/sdk/test_list_pagination.py -v
```

No source code changes required - Python implementation already correct.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants